<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>K19 - Ajax</title>
</h:head>
<h:body>

	<h:form prependId="false">
		<h:panelGrid columns="2">
			<h:inputText id="caixa">
				<f:ajax event="keyup" execute="@this" render="mensagem"></f:ajax>
				<f:validateLength minimum="5" maximum="10" />
			</h:inputText>
			<h:message for="caixa" id="mensagem" style="color: red; font-size:14px" />

			<h:commandButton value="Enviar" />
		</h:panelGrid>
	</h:form>

</h:body>
</html>
